package org.acra.b;

import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;
import android.util.DisplayMetrics;
import android.util.SparseArray;
import android.view.Display;
import android.view.WindowManager;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.acra.ACRA;

final class f
{
  static final SparseArray a = new SparseArray();
  static final SparseArray b = new SparseArray();

  private static Object a(Display paramDisplay)
  {
    paramDisplay.getMetrics(new DisplayMetrics());
    StringBuilder localStringBuilder = new StringBuilder();
    localStringBuilder.append(e(paramDisplay));
    localStringBuilder.append(f(paramDisplay));
    localStringBuilder.append(paramDisplay.getDisplayId()).append(".height=").append(paramDisplay.getHeight()).append('\n');
    localStringBuilder.append(b(paramDisplay, "getMetrics"));
    localStringBuilder.append(g(paramDisplay));
    localStringBuilder.append(paramDisplay.getDisplayId()).append(".orientation=").append(paramDisplay.getOrientation()).append('\n');
    localStringBuilder.append(paramDisplay.getDisplayId()).append(".pixelFormat=").append(paramDisplay.getPixelFormat()).append('\n');
    localStringBuilder.append(b(paramDisplay, "getRealMetrics"));
    localStringBuilder.append(a(paramDisplay, "getRealSize"));
    localStringBuilder.append(d(paramDisplay));
    localStringBuilder.append(paramDisplay.getDisplayId()).append(".refreshRate=").append(paramDisplay.getRefreshRate()).append('\n');
    localStringBuilder.append(c(paramDisplay));
    localStringBuilder.append(a(paramDisplay, "getSize"));
    localStringBuilder.append(paramDisplay.getDisplayId()).append(".width=").append(paramDisplay.getWidth()).append('\n');
    localStringBuilder.append(b(paramDisplay));
    return localStringBuilder.toString();
  }

  private static Object a(Display paramDisplay, String paramString)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    try
    {
      Method localMethod = paramDisplay.getClass().getMethod(paramString, new Class[] { Point.class });
      Point localPoint = new Point();
      localMethod.invoke(paramDisplay, new Object[] { localPoint });
      localStringBuilder.append(paramDisplay.getDisplayId()).append('.').append(paramString).append("=[").append(localPoint.x).append(',').append(localPoint.y).append(']').append('\n');
      label106: return localStringBuilder.toString();
    }
    catch (InvocationTargetException localInvocationTargetException)
    {
      break label106;
    }
    catch (IllegalAccessException localIllegalAccessException)
    {
      break label106;
    }
    catch (IllegalArgumentException localIllegalArgumentException)
    {
      break label106;
    }
    catch (NoSuchMethodException localNoSuchMethodException)
    {
      break label106;
    }
    catch (SecurityException localSecurityException)
    {
      break label106;
    }
  }

  public static String a(Context paramContext)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    Display[] arrayOfDisplay1;
    if (a.a() < 17)
    {
      WindowManager localWindowManager = (WindowManager)paramContext.getSystemService("window");
      Display[] arrayOfDisplay2 = new Display[1];
      arrayOfDisplay2[0] = localWindowManager.getDefaultDisplay();
      arrayOfDisplay1 = arrayOfDisplay2;
    }
    while (true)
    {
      int i = arrayOfDisplay1.length;
      for (int j = 0; j < i; j++)
        localStringBuilder.append(a(arrayOfDisplay1[j]));
      try
      {
        Object localObject = paramContext.getSystemService((String)paramContext.getClass().getField("DISPLAY_SERVICE").get(null));
        arrayOfDisplay1 = (Display[])localObject.getClass().getMethod("getDisplays", new Class[0]).invoke(localObject, new Object[0]);
      }
      catch (IllegalArgumentException localIllegalArgumentException)
      {
        ACRA.log.a(ACRA.LOG_TAG, "Error while collecting DisplayManager data: ", localIllegalArgumentException);
        arrayOfDisplay1 = null;
      }
      catch (SecurityException localSecurityException)
      {
        ACRA.log.a(ACRA.LOG_TAG, "Error while collecting DisplayManager data: ", localSecurityException);
        arrayOfDisplay1 = null;
      }
      catch (IllegalAccessException localIllegalAccessException)
      {
        ACRA.log.a(ACRA.LOG_TAG, "Error while collecting DisplayManager data: ", localIllegalAccessException);
        arrayOfDisplay1 = null;
      }
      catch (NoSuchFieldException localNoSuchFieldException)
      {
        ACRA.log.a(ACRA.LOG_TAG, "Error while collecting DisplayManager data: ", localNoSuchFieldException);
        arrayOfDisplay1 = null;
      }
      catch (NoSuchMethodException localNoSuchMethodException)
      {
        ACRA.log.a(ACRA.LOG_TAG, "Error while collecting DisplayManager data: ", localNoSuchMethodException);
        arrayOfDisplay1 = null;
      }
      catch (InvocationTargetException localInvocationTargetException)
      {
        ACRA.log.a(ACRA.LOG_TAG, "Error while collecting DisplayManager data: ", localInvocationTargetException);
        arrayOfDisplay1 = null;
      }
    }
    return localStringBuilder.toString();
  }

  private static String a(SparseArray paramSparseArray, int paramInt)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    for (int i = 0; i < paramSparseArray.size(); i++)
    {
      int j = paramInt & paramSparseArray.keyAt(i);
      if (j > 0)
      {
        if (localStringBuilder.length() > 0)
          localStringBuilder.append('+');
        localStringBuilder.append((String)paramSparseArray.get(j));
      }
    }
    return localStringBuilder.toString();
  }

  private static Object b(Display paramDisplay)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    try
    {
      Boolean localBoolean = (Boolean)paramDisplay.getClass().getMethod("isValid", new Class[0]).invoke(paramDisplay, new Object[0]);
      localStringBuilder.append(paramDisplay.getDisplayId()).append(".isValid=").append(localBoolean).append('\n');
      label58: return localStringBuilder.toString();
    }
    catch (InvocationTargetException localInvocationTargetException)
    {
      break label58;
    }
    catch (IllegalAccessException localIllegalAccessException)
    {
      break label58;
    }
    catch (IllegalArgumentException localIllegalArgumentException)
    {
      break label58;
    }
    catch (NoSuchMethodException localNoSuchMethodException)
    {
      break label58;
    }
    catch (SecurityException localSecurityException)
    {
      break label58;
    }
  }

  private static Object b(Display paramDisplay, String paramString)
  {
    int i = 0;
    StringBuilder localStringBuilder = new StringBuilder();
    try
    {
      DisplayMetrics localDisplayMetrics = (DisplayMetrics)paramDisplay.getClass().getMethod(paramString, new Class[0]).invoke(paramDisplay, new Object[0]);
      Field[] arrayOfField = DisplayMetrics.class.getFields();
      int j = arrayOfField.length;
      if (i < j)
      {
        Field localField = arrayOfField[i];
        if ((localField.getType().equals(Integer.class)) && (localField.getName().startsWith("DENSITY_")) && (!localField.getName().equals("DENSITY_DEFAULT")))
          b.put(localField.getInt(null), localField.getName());
      }
      else
      {
        localStringBuilder.append(paramDisplay.getDisplayId()).append('.').append(paramString).append(".density=").append(localDisplayMetrics.density).append('\n');
        localStringBuilder.append(paramDisplay.getDisplayId()).append('.').append(paramString).append(".densityDpi=").append(localDisplayMetrics.getClass().getField("densityDpi")).append('\n');
        localStringBuilder.append(paramDisplay.getDisplayId()).append('.').append(paramString).append("scaledDensity=x").append(localDisplayMetrics.scaledDensity).append('\n');
        localStringBuilder.append(paramDisplay.getDisplayId()).append('.').append(paramString).append(".widthPixels=").append(localDisplayMetrics.widthPixels).append('\n');
        localStringBuilder.append(paramDisplay.getDisplayId()).append('.').append(paramString).append(".heightPixels=").append(localDisplayMetrics.heightPixels).append('\n');
        localStringBuilder.append(paramDisplay.getDisplayId()).append('.').append(paramString).append(".xdpi=").append(localDisplayMetrics.xdpi).append('\n');
        localStringBuilder.append(paramDisplay.getDisplayId()).append('.').append(paramString).append(".ydpi=").append(localDisplayMetrics.ydpi).append('\n');
        label383: return localStringBuilder.toString();
      }
    }
    catch (NoSuchFieldException localNoSuchFieldException)
    {
      break label383;
    }
    catch (InvocationTargetException localInvocationTargetException)
    {
      break label383;
    }
    catch (IllegalAccessException localIllegalAccessException)
    {
      break label383;
    }
    catch (IllegalArgumentException localIllegalArgumentException)
    {
      break label383;
    }
    catch (NoSuchMethodException localNoSuchMethodException)
    {
      break label383;
    }
    catch (SecurityException localSecurityException)
    {
      while (true)
      {
        continue;
        i++;
      }
    }
  }

  private static Object c(Display paramDisplay)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    try
    {
      int i = ((Integer)paramDisplay.getClass().getMethod("getRotation", new Class[0]).invoke(paramDisplay, new Object[0])).intValue();
      localStringBuilder.append(paramDisplay.getDisplayId()).append(".rotation=");
      switch (i)
      {
      default:
        localStringBuilder.append(i);
      case 0:
      case 1:
      case 2:
      case 3:
      }
      while (true)
      {
        localStringBuilder.append('\n');
        label98: return localStringBuilder.toString();
        localStringBuilder.append("ROTATION_0");
        continue;
        localStringBuilder.append("ROTATION_90");
        continue;
        localStringBuilder.append("ROTATION_180");
        continue;
        localStringBuilder.append("ROTATION_270");
      }
    }
    catch (IllegalAccessException localIllegalAccessException)
    {
      break label98;
    }
    catch (InvocationTargetException localInvocationTargetException)
    {
      break label98;
    }
    catch (SecurityException localSecurityException)
    {
      break label98;
    }
    catch (NoSuchMethodException localNoSuchMethodException)
    {
      break label98;
    }
    catch (IllegalArgumentException localIllegalArgumentException)
    {
      break label98;
    }
  }

  private static Object d(Display paramDisplay)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    try
    {
      Method localMethod = paramDisplay.getClass().getMethod("getRectSize", new Class[] { Rect.class });
      Rect localRect = new Rect();
      localMethod.invoke(paramDisplay, new Object[] { localRect });
      localStringBuilder.append(paramDisplay.getDisplayId()).append(".rectSize=[").append(localRect.top).append(',').append(localRect.left).append(',').append(localRect.width()).append(',').append(localRect.height()).append(']').append('\n');
      label127: return localStringBuilder.toString();
    }
    catch (InvocationTargetException localInvocationTargetException)
    {
      break label127;
    }
    catch (IllegalAccessException localIllegalAccessException)
    {
      break label127;
    }
    catch (IllegalArgumentException localIllegalArgumentException)
    {
      break label127;
    }
    catch (NoSuchMethodException localNoSuchMethodException)
    {
      break label127;
    }
    catch (SecurityException localSecurityException)
    {
      break label127;
    }
  }

  private static String e(Display paramDisplay)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    try
    {
      Method localMethod = paramDisplay.getClass().getMethod("getCurrentSizeRange", new Class[] { Point.class, Point.class });
      Point localPoint1 = new Point();
      Point localPoint2 = new Point();
      localMethod.invoke(paramDisplay, new Object[] { localPoint1, localPoint2 });
      localStringBuilder.append(paramDisplay.getDisplayId()).append(".currentSizeRange.smallest=[").append(localPoint1.x).append(',').append(localPoint1.y).append(']').append('\n');
      localStringBuilder.append(paramDisplay.getDisplayId()).append(".currentSizeRange.largest=[").append(localPoint2.x).append(',').append(localPoint2.y).append(']').append('\n');
      label165: return localStringBuilder.toString();
    }
    catch (InvocationTargetException localInvocationTargetException)
    {
      break label165;
    }
    catch (IllegalAccessException localIllegalAccessException)
    {
      break label165;
    }
    catch (IllegalArgumentException localIllegalArgumentException)
    {
      break label165;
    }
    catch (NoSuchMethodException localNoSuchMethodException)
    {
      break label165;
    }
    catch (SecurityException localSecurityException)
    {
      break label165;
    }
  }

  private static String f(Display paramDisplay)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    try
    {
      int i = ((Integer)paramDisplay.getClass().getMethod("getFlags", new Class[0]).invoke(paramDisplay, new Object[0])).intValue();
      Field[] arrayOfField = paramDisplay.getClass().getFields();
      int j = arrayOfField.length;
      k = 0;
      if (k < j)
      {
        Field localField = arrayOfField[k];
        if (localField.getName().startsWith("FLAG_"))
          a.put(localField.getInt(null), localField.getName());
      }
      else
      {
        localStringBuilder.append(paramDisplay.getDisplayId()).append(".flags=").append(a(a, i)).append('\n');
        label134: return localStringBuilder.toString();
      }
    }
    catch (InvocationTargetException localInvocationTargetException)
    {
      break label134;
    }
    catch (IllegalAccessException localIllegalAccessException)
    {
      break label134;
    }
    catch (IllegalArgumentException localIllegalArgumentException)
    {
      break label134;
    }
    catch (NoSuchMethodException localNoSuchMethodException)
    {
      break label134;
    }
    catch (SecurityException localSecurityException)
    {
      while (true)
      {
        int k;
        continue;
        k++;
      }
    }
  }

  private static String g(Display paramDisplay)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    try
    {
      String str = (String)paramDisplay.getClass().getMethod("getName", new Class[0]).invoke(paramDisplay, new Object[0]);
      localStringBuilder.append(paramDisplay.getDisplayId()).append(".name=").append(str).append('\n');
      label60: return localStringBuilder.toString();
    }
    catch (InvocationTargetException localInvocationTargetException)
    {
      break label60;
    }
    catch (IllegalAccessException localIllegalAccessException)
    {
      break label60;
    }
    catch (IllegalArgumentException localIllegalArgumentException)
    {
      break label60;
    }
    catch (NoSuchMethodException localNoSuchMethodException)
    {
      break label60;
    }
    catch (SecurityException localSecurityException)
    {
      break label60;
    }
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     org.acra.b.f
 * JD-Core Version:    0.6.2
 */